home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Softshoe / Lisa's Mac Parts / Printing / PrintJob.h < prev    next >
Text File  |  2000-06-23  |  1KB  |  56 lines

  1. // PrintJob.h
  2.  
  3. #ifndef PrintJob_h
  4. #define PrintJob_h
  5.  
  6. #ifndef Assert_h
  7. #include "Assert.h"
  8. #endif
  9. #ifndef HandleTo_h
  10. #include "HandleTo.h"
  11. #endif
  12. #ifndef Rectangle_h
  13. #include "Rectangle.h"
  14. #endif
  15.  
  16. #include <Printing.h>
  17.  
  18. class PrintManager;
  19. class PageSetupInfo;
  20. class PrintJobInfo;
  21.  
  22. class PrintJob
  23.   {
  24.     private:
  25.         HandleTo<TPrint> printHandle;
  26.         uint32 firstPage;
  27.         uint32 lastPage;
  28.         
  29.         // not implemented:
  30.             PrintJob( const PrintJob& );
  31.             void operator=( const PrintJob& );
  32.     
  33.     public:
  34.         PrintJob( const PrintManager&,
  35.                      const PageSetupInfo&,
  36.                      const PrintJobInfo& );
  37.  
  38.         const HandleTo<TPrint>& PrintHandle() const    { return printHandle; }
  39.         
  40.         uint32 CopyCount() const                            { return printHandle->prJob.iCopies; }
  41.  
  42.         uint32 FirstPage() const                            { return firstPage; }
  43.         uint32 LastPage() const                                { return lastPage; }
  44.         
  45.         Rectangle PageArea() const                            { return printHandle->prInfo.rPage; }
  46.         Rectangle PaperArea() const                        { return printHandle->rPaper; }
  47.         
  48.         uint16 VerticalResolution() const                { return printHandle->prInfo.iVRes; }
  49.         uint16 HorizontalResolution() const                { return printHandle->prInfo.iHRes; }
  50.             // both in dots per inch
  51.         
  52.         bool Spooled() const            { return printHandle->prJob.bJDocLoop == bSpoolLoop; }
  53.   };
  54.  
  55. #endif
  56.